/*********************************************************************************************************
**
**                                   GJB 标准测试集
**
**                               Copyright All Rights Reserved
**
**--------------文件信息--------------------------------------------------------------------------------
**
** 文   件   名: gjb_S0100901GN_2.c
**
** 文件创建日期: 2021 年 1 月 22 日
**
** 描        述: 初始化、销毁条件变量功能测试
*********************************************************************************************************/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>

//#include "gjb.h"

int gjb_S0100901GN_2(int argc, char **argv)
{
    int                rc = 123;

    pthread_condattr_t condattr;
    pthread_cond_t     cond1;

    /*
     *  Initialize cond1 with the default condition variable attributes
     */
    if ((rc = pthread_cond_init(&cond1,&condattr)) != EINVAL) {
        printf("Fail to initialize cond1, rc=%d\n",rc);
        printf("Test FAILED\n");
        goto __errno_handle;
    }

    printf("<RSLT>..................................................[(0)]\n \n \n");

    return  (0);
__errno_handle:
    printf("<RSLT>..................................................[(-1)]\n \n \n");
    return  (-1);
}
